class Director  // 调用者类，用于固定方法的调用顺序
{
	Builder builder;  // 关联建造者父类
	public void SetBuilder(Builder b) { builder = b; }  // 给建造者父类赋值
	public void Show() {  // 封装方法调用顺序
		builder.ShowA();
		builder.ShowB();
	}
}
abstract class Builder {  // 建造者父类，用于抽象出稳定的结构（方法）
	public abstract void ShowA();
	public abstract void ShowB();
}
class BuilderA : Builder {  // 建造者子类，实现具体细节
	public override void ShowA() { Console.WriteLine("BuilderA.ShowA()"); }
	public override void ShowB() { Console.WriteLine("BuilderA.ShowB()"); }
}
class BuilderB : Builder {  // 建造者子类，实现具体细节
	public override void ShowA() { Console.WriteLine("BuilderB.ShowA()"); }
	public override void ShowB() { Console.WriteLine("BuilderB.ShowB()"); }
}